import request from '@/utils/request';

// 抖支付活动新增
export async function addActivityconfig(data) {
  const res = await request.post(
    '/business/activityconfig/addActivityconfig',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
// 抖支付活动修改
export async function updateActivityconfig(data) {
  const res = await request.post(
    '/business/activityconfig/updateActivityconfig',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 抖支付详情
export async function getActivityconfig(data) {
  const res = await request.post(
    '/business/activityconfig/getActivityconfig',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
